package com.usian.article.controller.v1;

import com.usian.apis.article.CollectionBehaviorControllerApi;
import com.usian.article.service.CollectionService;
import com.usian.model.article.dtos.CollectionBehaviorDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ap/collection")
public class CollectionBehaviorController implements CollectionBehaviorControllerApi {

    @Autowired
    private CollectionService collectionService;

    //收藏与取消收藏
    @Override
    @PostMapping
    public ResponseResult collection(@RequestBody CollectionBehaviorDto dto) {
        return collectionService.collection(dto);
    }
}
